//
//  THUserLoinInfoModel.swift
//  tripartiteTestDemo
//
//  Created by rimi on 2017/5/19.
//  Copyright © 2017年 rimi. All rights reserved.
//

import UIKit

class THUserLoinInfo: NSObject {
    var sAvator: String?
    var sBabyAge: Int = 0
    var sBabyGender: Int = 0
    var sCollectTotal: Int = 0
    var sGender: Int = 0
    var sIntro: String?
    var sMsgTotal: Int = 0
    var sNickname: String?
    var sProvince: String?
    var sUserid: Int = 0
    var sUsername: String?
    var sid: String?
    
    // 全局的静态属性
    static let currentUser = THUserLoinInfo()
    // 重写并将构造方法设为私有，这是外界初始化时就只能使用单例类方法
    private override init() {}
    
    // 处理特殊key
    override func setValue(_ value: Any?, forUndefinedKey key: String) {
        if key == "sCollectTotal " {
            sCollectTotal = Int(value as! String)!
        }
    }
}

/*
 sAvator = "http://test.thclub.cn/data/upload/avatar/000/00/00/a5bfc9e07964f8dddeb95fc584cd965d_100.jpg";
 sBabyAge = 1;
 sBabyGender = 2;
 "sCollectTotal " = 19;
 sGender = 2;
 sIntro = leileile;
 sMsgTotal = 4;
 sNickname = leissss;
 sProvince = "\U5317\U4eac";
 sUserid = 37;
 sUsername = lei;
 sid = db5b4ebdb74d036ee296298bca6bbcab;
 */
